<template>
  <div class="modal" @touchmove.prevent @touchstart="closeModal">
    <v-goods-num :myData="myData" v-show="this.$parent.numSelect==1"></v-goods-num>
    <v-goodsDiscount v-show="this.$parent.numSelect==2"></v-goodsDiscount>
  </div>
</template>

<script>
  import goodsNum from '../goods/goods-num-select'
  import goodsDiscount from '../goods/goods-discount'

  export default {
    name: "index",
    props:["myData"],
    data(){
      return{

      }
    },
    methods:{
      closeModal:function () {
        this.$parent.isShow=false;
      }
    },
    components: {
      "v-goods-num": goodsNum,
      "v-goodsDiscount": goodsDiscount
    }
  }
</script>

<style scoped>
  .modal {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    left: 0;
    top: 0;
  }
</style>
